# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        博智科技  
# Name:         slnm_demo
# Description:  自动化h火狐/谷歌浏览器
# Author:       yzl
# Date:         2019-03-06
#-------------------------------------------------------------------------------

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

#driver = webdriver.Firefox()
driver = webdriver.Chrome()
time.sleep(2)
driver.get("http://zzbozhi.net/demo/index.php?m=Login&a=login")
assert "博美云会员系统" in driver.title
elem = driver.find_element_by_name("txtusername")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

